using IceZero.RootNode;
using System;
using System.Linq;
using Xunit;

namespace IceZero.DataStore.xUnit
{
    public class UnitTest1
    {
        public UnitTest1()
        {
            NHibernateHelperConfig.ConfigAddInputStream(NHibernateHelper.Configuration, NHibernateHelper.GenMappingXMLs(genFile: true));
            NHibernateHelper.Configure("work.mysql.hibernate.cfg.xml");

        }

        [Fact]
        public void Test1()
        {
            var ds = IceZeroNode.Default.BusinessNode.CatBusiness.CatDataStore;
            var list = ds.QueryByHQL("from Cat");
            Assert.True(list.Count > 0);
        }
    }
}
